package cn.ex.org.controller;

import cn.ex.org.domain.Employee;
import cn.ex.org.service.IEmployeeService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: ZeWangmu
 * @Date: 2022/06/06/20:19
 * @Description: 部门管理请求和响应的接口
 */
@RestController
@RequestMapping("/emp")
@Api(value = "部员工的API",description="员工相关的CRUD功能")
public class EmployeeController {
    @Autowired
    private IEmployeeService employeeService;

    /**
     * 查询所有
     * @return
     */
    @GetMapping
    public List<Employee> findAll(){
        return employeeService.findAll();
    }

}
